<!DOCTYPE html>
<html>
<head>
    <title>产品属性选项特殊关系表</title>
    <#include "/header.html">
</head>
<style>
    .el-card__header {
        padding: 8px;
        border-bottom: 1px solid #dde0e6;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        background: #f5f5f5;
    }
    .el-card__body {
        padding: 10px;
    }
    .el-form-item--small.el-form-item {
        margin-bottom: 10px;
    }
</style>
<body>
<div id="rrapp" v-cloak>
    <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="属性特规" name="first">
            <div v-show="attributeSpecial.showList">
                <!--查询-->
                <el-form :inline="true" class="demo-form-inline" size="small">
                    <el-form-item label="分类">
                        <el-input v-model.trim="attributeSpecial.queryParams.categoryName" ></el-input>
                    </el-form-item>
                    <el-form-item label="部件">
                        <el-input v-model.trim="attributeSpecial.queryParams.partsName" ></el-input>
                    </el-form-item>
                    <el-form-item label="属性">
                        <el-input v-model.trim="attributeSpecial.queryParams.attributeName" ></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="search">查询</el-button>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="success" @click="addAttributeSpecial">增加属性特规</el-button>
                    </el-form-item>
                </el-form>
                <!--属性特规表格-->
                <el-table size="mini" :data="attributeSpecial.specialData" border style="width: 100%">

                    <el-table-column    type="index"  label="#"  >  </el-table-column>

                    <el-table-column     label="操作"  width="100" >
                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
                                    type="primary"
                                    icon="el-icon-edit"
                                    @click="handleEditAttributeSpecial(scope.row.id)">编辑</el-button>
                        </template>

                    </el-table-column>

                    <el-table-column    prop="categoryName"  label="分类"  >  </el-table-column>

                    <el-table-column    prop="partsName"  label="部件"  >  </el-table-column>

                    <el-table-column    prop="attributeName"  label="属性"  >  </el-table-column>

                    <el-table-column    prop="attributeIgnoreDefinition"  label="是否自定义"  width="150"   >
                        <template slot-scope="scope">
                            {{scope.row.attributeIgnoreDefinition == 1?'是':'否'}}
                        </template>
                    </el-table-column>

                    <el-table-column    prop="attributeMustChoice"  label="必选工艺"  width="150"  >
                        <template slot-scope="scope">
                            {{scope.row.attributeMustChoice == 1?'是':'否'}}
                        </template>
                    </el-table-column>

                    <el-table-column    prop="attributeDisplay"  label="前端是否显示"  width="150"  >
                        <template slot-scope="scope">
                            {{scope.row.attributeDisplay == 1?'是':'否'}}
                        </template>
                    </el-table-column>

                </el-table>
                <!--分页插件-->
                <div style="text-align: center;margin: 15px">
                    <el-pagination
                            @size-change="handleAttributeSizeChange"
                            @current-change="handleAttributeCurrentChange"
                            :current-page="attributeSpecial.page.currentPage"
                            :page-sizes="attributeSpecial.page.pageSizes"
                            :page-size="attributeSpecial.page.pageSize"
                            layout="total, sizes, prev, pager, next"
                            :total="attributeSpecial.page.total">
                    </el-pagination>
                </div>
            </div>
            <!--编辑/新增-->
            <div v-show="!attributeSpecial.showList" >
                <zy-attribute-special
                        :is-add="attributeSpecial.isAdd"
                        :id="attributeSpecial.id"
                        ref="zyAttributeSpecial"
                        @go-back-attribute="goBackAttribute"
                >
                </zy-attribute-special>
            </div>
        </el-tab-pane>
        <el-tab-pane label="选项特规" name="second">
            <div v-show="optionSpecial.showList">
                <!--查询-->
                <el-form :inline="true" class="demo-form-inline" size="small">
                    <el-form-item label="分类">
                        <el-input v-model.trim="optionSpecial.queryParams.categoryName" ></el-input>
                    </el-form-item>
                    <el-form-item label="部件">
                        <el-input v-model.trim="optionSpecial.queryParams.partsName" ></el-input>
                    </el-form-item>
                    <el-form-item label="选项">
                        <el-input v-model.trim="optionSpecial.queryParams.optionName" ></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="searchOptionSpecial">查询</el-button>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="success" @click="addOptionSpecial">增加选项特规</el-button>
                    </el-form-item>
                </el-form>
                <!--选项特规表格-->
                <el-table size="mini" :data="optionSpecial.specialData" border style="width: 100%">

                    <el-table-column    type="index"  label="#"  >  </el-table-column>

                    <el-table-column     label="操作"  width="100" >
                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
                                    type="primary"
                                    icon="el-icon-edit"
                                    @click="handleEditOptionSpecial(scope.row.id)">编辑</el-button>
                        </template>

                    </el-table-column>

                    <el-table-column    prop="categoryName"  label="分类"  >  </el-table-column>

                    <el-table-column    prop="partsName"  label="部件"  >  </el-table-column>

                    <el-table-column    prop="optionName"  label="选项"  >  </el-table-column>

                    <el-table-column    prop="optionIgnoreDefinition"  label="是否自定义"  width="150"   >
                        <template slot-scope="scope">
                            {{scope.row.optionIgnoreDefinition == 1?'是':'否'}}
                        </template>
                    </el-table-column>

                    <el-table-column    prop="optionMustChoice"  label="必选工艺"  width="150"  >
                        <template slot-scope="scope">
                            {{scope.row.optionMustChoice == 1?'是':'否'}}
                        </template>
                    </el-table-column>

                </el-table>
                <!--分页插件-->
                <div style="text-align: center;margin: 15px">
                    <el-pagination
                            @size-change="handleOptionSizeChange"
                            @current-change="handleOptionCurrentChange"
                            :current-page="optionSpecial.page.currentPage"
                            :page-sizes="optionSpecial.page.pageSizes"
                            :page-size="optionSpecial.page.pageSize"
                            layout="total, sizes, prev, pager, next"
                            :total="optionSpecial.page.total">
                    </el-pagination>
                </div>
            </div>
            <!--编辑/新增-->
            <div v-show="!optionSpecial.showList" >
                <zy-option-special
                        :is-add="optionSpecial.isAdd"
                        :id="optionSpecial.id"
                        ref="zyOptionSpecial"
                        @go-back-option="goBackOption"
                >
                </zy-option-special>
            </div>
        </el-tab-pane>
    </el-tabs>
</div>

<script src="${request.contextPath}/statics/js/modules/quoteProductAttributeOptionRelation/quoteproductattributeoptionrelation.js?_${.now?long}"></script>
</body>
</html>